import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("share_article", { schema: "alumni" })
export class ShareArticle {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("int", {
    name: "school_id",
    comment: "所属学校",
    unsigned: true,
    default: () => "'0'",
  })
  schoolId: number;

  @Column("varchar", { name: "class_name", comment: "班级", length: 100 })
  className: string;

  @Column("int", {
    name: "user_id",
    comment: "创建人",
    unsigned: true,
    default: () => "'0'",
  })
  userId: number;

  @Column("varchar", { name: "cover", comment: "封面", length: 100 })
  cover: string;

  @Column("text", { name: "content", comment: "内容" })
  content: string;

  @Column("int", { name: "create_time", unsigned: true, default: () => "'0'" })
  createTime: number;
}
